A method using orthogonal transformation as typified by JPEG (Joint Photographic coding Experts Group) is widely used as a conventional method for encoding a natural image such as a photograph.
JPEG is a method for encoding a color static image and of lossy transformation, but has less deterioration of image quality for natural image such as a picture. Consequently, JPEG is used in many applications such as Internet, digital cameras or the like and is also used as a standard image encoding method in a color facsimile.
For instance, the JPEG is used as the standard method for encoding the image in a color facsimile apparatus. Here, explanation about the JPEG to be used for the color facsimile apparatus is given L*a*b* color space is usually used for representing a color of each pixel of the image. When the image is compressed, an original image represented in RGB is transformed to the L*a*b* color space and resolution of a color difference component represented as a* and b* is compressed in half. Next, the image transformed to the color space is divided into blocks composed of 8×8 pixels and each block is transformed to a spatial frequency component by discrete cosine transform (abbreviated as “DCT”). The spatial frequency component transformed by the DCT is divided by quantizing matrix and Huffman coding is performed for a part of an integer of the divided component and thereby the compressed image is given. According to JPEG, when the spatial frequency component is divided by using the quantizing matrix, high frequency component is mainly high-compressed. In addition, a direct current (abbreviated as “DC”) component on an upper left end of matrix of the spatial frequency component is compressed by performing Huffman coding which is a lossless entropy compression method and other components are picked out diagonally and zigzag and are similarly compressed by performing Huffman coding.
JPEG as mentioned above uses a quantizing table by which higher compression is performed for higher frequency component by means of the fact that a human's eye is obtuse for high frequency component. The spatial frequency component is divided by the quantizing matrix and integer approximation is applied to the divided component and thereby information of the original image is lost Consequently, when the image is decoded by performing an inverse processing for encoding processing, the high frequency component is especially lost in a reproduced image. Thus, JPEG is a lossy method for encoding the image in which performing inverse transformation of the compressed image leads to production of a different image from the original image.
As mentioned above, JPEG is a lossy method for encoding the image and therefore, as to an image having steep variation of density of a character or the like, deterioration of quality of the image becomes serious. Consequently, as to an image given by performing processing for encoding an image including an edge such as a character or the like and then performing processing for decoding the image again, a hazy part, so-called mosquito noise, occurs on the image. The mosquito noise does not occur at the time of performing modified Huffman coding and modified Reed coding to be performed as a method for compressing the image in a monochrome facsimile, but the mosquito noise occurs mainly on a white base around the character at the time of performing JPEG and thereby dignity of the character is decreased significantly.
FIGS. 7A, 7B and 7C are views concretely describing occurrence of mosquito noise. In FIGS. 7A, 7B and 7C, a vertical axis denotes a color of each component at each color spatial coordinates on 256 tone value levels [from 0 (black) to 255 (white)] and a horizontal axis denotes one-dimensional pixel position. Here, only component L* which is lightness component sensitively seen by a human's eye is shown in consideration of a case of a standard color facsimile apparatus using the L*a*b* space. A color image is generally represented by three color components such as RGB or the like and each component is quantized to components on N steps within the extent from 0 to N−1. (N: A natural number equal to or more than 2) The greater the N is set, the more representation of the image becomes faithful to the original image, but when the image is processed by electronic equipment such as a computer or the like, N equal to 256 corresponding to the image represented by 8 bits is often selected.
Here, encoding is performed for an image whose left side is a character area and has high density and whose right side is a white margin area, in other words, for an image whose tone value is small on the left side of the pixel position or namely whose density is high and whose tone value is equal to 255 on the right side of the pixel position or namely whose density is low as shown in FIG. 7A. The image shown in FIG. 7A is encoded by JPEG and the encoded image is retransformed to be reproduced by performing inverse processing for the processing for encoding the image and the reproduced image is shown in FIG. 7B. FIG. 7B is a view showing a decoded image prior to clipping the image at the tone value equal to 255. Since high frequency component is high-compressed by encoding the image in the case of JPEG, the decoded image prior to clipping the image has a left image like a ripple on a white part of the decoded image and there is occurrence of a pixel whose tone value becomes a value equal to or more than 255. Therefore, in inverse transformation processing, a pixel outside of an extent of the tone value equal to or more than 255 is processed by clipping and the tone value is fixed to 255 as shown in FIG. 7C. As described above, since high frequency component is high-compressed in the conventional method for encoding the image, ripple density difference occurs in a part including high frequency component such as a character or the like. This ripple density difference causes the mosquito noise. In addition, similar ripple density difference also occurs in a black part which is a character area of the decoded image, but the similar ripple density difference is not practically so conspicuous and therefore, explanation about the similar ripple density difference is omitted in order to be simplified.
To reduce the above-mentioned mosquito noise, a value of the quantizing matrix should be made small. However, when the value of the quantizing matrix is made small, a compression ratio becomes small and therefore, for instance there is a problem that sending time becomes long in the color facsimile. Equipment such as many conventional color facsimile apparatus or the like is equipped with only JPEG as a method for encoding a color image and encodes a character to be used for representing an addresser or the like by JPEG and therefore, there is a problem that noise in the character area is conspicuous.
In addition, in the case of JPEG-2000, an image is not divided into a block and encoded by using wavelet transformation. However, the mosquito noise similarly occurs in this case.
The method for reducing occurrence of the above-mentioned mosquito noise is disclosed for instance in Japanese unexamined patent publications JP-A 6-86328 (1994), JP-A 7-50849 (1995), JP-A 11-308463 (1999), JP-A 2000-307879 (2000) and JP-A 2001-16452 (2001).
JP-A 6-86328 discloses an image decoding apparatus for removing the mosquito noise of a color difference signal generated by decoding high-compressed image data on the basis of a brightness signal
In addition, in JP-A 7-50849, to enable a beautiful character to be displayed even when compression/expansion processing of image information is applied to an image resulting from synthesizing characters, a noise reduction portion is provided between an image memory and an image compression/expansion portion and prior to inputting the image resulting from synthesizing characters from the image memory to the image compression/expansion portion, a pixel having a halftone color between a character tone and a tone around the character is inserted as a first positioned pixel in horizontal and vertical directions on the outside of the synthesized characters.
In addition, in JP-A 11-308463, on the occasion of compression of image data in which a tone image such as a natural image or the like is mixed with a non-tone image such as characters or graphics or the like, the tone image and the non-tone image are encoded by using a different method for encoding each of the images respectively.
In addition, in JP-A 2000-307879, to reduce the mosquito noise, an image area of a mixed image is judged by a judging circuit for a brightness signal from among color component signals and the natural image is quantized by a quantizing table a and a binary image data is quantized by using a quantizing table b (a<b) and is sent and on a receiving side, asymmetric inverse quantizing is performed for the binary image data by using the same reference value as used in the quantizing table a and a part sticking out from a dynamic range of the brightness is clamped by the clamping circuit.
In addition, in JP-A 2000-16452, the mosquito noise is reduced by providing first base removal processing and second base removal processing respectively before and after the compression/expansion processing for the image data.
On the other hand, the color facsimile apparatus has MRC (Mixed Raster Content) as an optional method for encoding the image except JPEG which is a standard method for encoding the image. Only part of information about the addresser can be sent in a lossless method for encoding the image without any occurrence of noise by using the MRC. MRC divides the image into three layers composed of a fore layer, a mask layer and a back layer and encodes each of the three layers in different methods respectively. The fore layer and the back layer are color images and the mask layer is a binary image and plays a role of a switch for displaying either the fore layer or the back layer on a decoder of the image. The fore layer and the back layer are encoded by using the method for encoding the standard color image of the color facsimile such as JPEG or the like. The method for encoding the standard color image has lossless and lossy methods, but the mask layer uses the lossless method for encoding the standard binary image of the monochrome facsimile.
There is a method utilizing a transmission color as a method for overlapping two images each other except MRC which the color facsimile apparatus has. This method can be used for synthesizing a facial portrait and a frame, or an object and a background or the like. Specifying the transmission color can be performed by each pixel, but when lossy method for encoding the image such as JPEG is applied, the tone value of the pixel is changed and noise is inserted in an extent of the specified transmission color and therefore, lossless encoding such as GIF (Graphics Interchange Format) or PNG (Portable Network Graphic) or the like is used on WWW browser for the internet.
In addition, MPEG (Motion Picture Coding Experts) 4 which is a method for encoding a moving image has a function for encoding an arbitrary shape image, but to specify a part which is not displayed on specifying the shape, an image which is called alpha plane is used except the image to be displayed. The alpha plane includes binary alpha plane and grayscale alpha plane of the binary image. The grayscale alpha plane is used for specifying translucence optionally and lossy encoding is applied to the grayscale alpha plane and lossless encoding is essentially applied to the binary scale alpha plane.
In the image encoding methods disclosed in JP-A 6-86328 and JP-A 7-50849, when an compressed image is decoded, noise is eliminated. However, since complicated processing is required for judging whether the noise really occurs, decrease of a speed of decoding and increase of cost due to increase of a scale of a circuit cannot be avoided. In addition, in the image encoding method disclosed in JP-A 2000-307879, as to binary image data, quantizing the image data on the sending side and inverse quantizing the image data on the receiving side are performed asymmetrically and therefore, a plurality of quantizing tables is required. In addition, in the image encoding method disclosed in JP-A 2001-16452, processing for eliminating a base is separately performed before compression of the image and after decompression of the image and thereby mosquito noise is reduced, but there is a problem that an apparatus for performing the processing for eliminating the base is required on the sides of compression and decompression, respectively.
In addition, in the prior art, to prevent noise from occurring by performing encoding, lossless encoding is applied to a part in which occurrence of the noise is not desired, even for a white part of the base of the addresser and the transmission color. However, lossless encoding such as PNG or GIF or the like has defect of lower compression ratio in comparison with lossy encoding. In addition, in JP-A 11-308463, since two or more methods for encoding the image are used on encoding three layers for MRC and encoding an arbitrary shape for MPEG4, there is a problem in no compatibility with application to which one conventional method for encoding the image has been applied.